export default function (Layout) {
  return [
    {
      path: '/redirect', component: Layout, meta: {hidden: true},
      children: [
        {path: '/redirect/:path(.*)', component: () => import('@/views/redirect/index.vue')}
      ]
    },
    {
      path: '/login', name: 'Login',
      meta: {hidden: true},
      component: () => import('@/views/login/index.vue')
    },
    {
      path: '/401', name: '401',
      meta: {hidden: true},
      component: () => import('@/views/error-page/401.vue')
    },
    {
      path: '/404', name: '404',
      meta: {hidden: true},
      component: () => import('@/views/error-page/404.vue')
    },
    // {path: '/:pathMatch(.*)', redirect: '/404', meta: {hidden: true}},
    {
      path: '/', redirect: '/dashboard', component: Layout,
      children: [
        {
          path: 'dashboard', name: 'Dashboard',
          meta: {title: 'dashboard', icon: 'dashboard', affix: true},
          component: () => import('@/views/dashboard/index.vue')
        }
      ]
    }
  ];
}